package com.dst.service.impl;

import com.dst.dao.PhoneDao;
import com.dst.dao.impl.PhoneDaoImpl;
import com.dst.eneity.Phone;
import com.dst.service.PhoneService;

import java.util.List;

public class PhoneServiceImpl implements PhoneService {
PhoneDao phoneDao=new PhoneDaoImpl();
    @Override
    public List<Phone> selectAllPhoneService() {
        return phoneDao.selectAllPhoneDao();
    }

    @Override
    public void deletePhoneById(int id) {
        phoneDao.deletByIdDao(id);
    }

    @Override
    public void addPhoneService(Phone phone) {
        phoneDao.addPhoneDao(phone);
    }

    @Override
    public Phone selectPhoneServiceById(int id) {
        return phoneDao.selectByIdPhoneDao(id);
    }

    @Override
    public void updatePhoneService(int id,Phone phone) {
        phoneDao.updatePhoneController(id,phone);
    }

    @Override
    public void batchDeleteService(int[] ids) {
        phoneDao.batchDleteDao(ids);
    }

    @Override
    public List<Phone> selectLimitPhoneService(int begin, int end) {
        return phoneDao.selectLimitPhoneDao(begin,end);
    }


    @Override
    public List<Phone> select(int bid) {
        return phoneDao.select(bid);
    }

    @Override
    public List<Phone> selectPage(int start, int pageSize) {
        return phoneDao.selectPage(start,pageSize);
    }

    @Override
    public int selectCount() {
        return phoneDao.selectCount();
    }
}
